package com.hacker.o2o.util;

/**
 * @Author:这个程序员有纹身
 * @Date: Created in 16:18 2018\1\6 0006
 */
public class PathUtil {
    private static String separator = System.getProperty("file.separator");

    public static String getImgBasePath(){
        String os = System.getProperty("os.name");
        String basePath = "";
        //根据存储系统的类别，指定根路径
        if(os.toLowerCase().startsWith("win")){
            basePath="D:/projectdev/image";
        }else{
            basePath="/Users/baidu/work/image";
        }
        basePath = basePath.replace("/",separator);
        return basePath;
    }

    public static String getShopImagePath(long shopId){
        String imagePath = "/upload/item/shop/" + shopId +"/";
        return imagePath.replace("/",separator);
    }
}
